|
|
|
| | | |
|
|
|
|
Figure 16.7
The Call Stack window. |
|
|
|
|  | The topmost value in the list is where youre currently executing code. Each lower item in the list is where you came from. |
|
|
|
|
|
|
Many times when youre testing an application, you dont want to read through every line in your program to arrive at where you think the error is. Therefore, instead of pressing F8 to step into your code from the beginning, you can set a breakpoint in your source code to tell Visual Basic where to stop executing when it reaches this line. |
|
|
|
|
| Setting Breakpoints 1. Stop the program by selecting Run, End from the menu bar, or by clicking the VCR Stop button on the toolbar. 2. Open up the Debug.bas file and go to the Proc2 procedure. 3. Click the line that reads frmDebug1.Print "We Are Now In Proc2()" (see Figure 16.8). 4. Press F9 to set a breakpoint. 5. Run your program by pressing F5. Click the Start command button to begin running the program. When you reach the breakpoint, Visual Basic will automatically put you in break mode. |
|
|
|